@using DNA.Mvc.Text;
@using DNA.Mvc.Community.Controllers;
@model Post
@{
    var post = new PostWrapper(Model);
}
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div style="margin-bottom: 5px; height: 30px;">
        @Ajax.ForumMapPath(Model.ForumID == 0 ? Model.Thread.ForumID : Model.ForumID)
    </div>
    <h1>
        @Html.Global("forums","Delete") : <span style="color: Gray;">@Model.Title</span>
    </h1>
    <hr />
    <div class="d-forums-post-body">
        <table style="width: 100%">
            <tr>
                <td class="d-forums-post-profile" style="vertical-align: top;">
                    <div style="display: inline-block">
                        <img src="@Url.Content("~/content/images/calendar_empty_16.png")" alt="postby" style="float: left;" />
                        @Html.Global(post.Posted)
                    </div>
                    @if (post.UserProfile != null)
                    {
                        Html.RenderPartial("UserInfo", post.UserProfile);
                    }
                </td>
                <td class="d-forums-post-content" style="vertical-align: top;">
                    <div style="max-height: 400px; overflow: auto;">
                        @TextEngine.BBCode(post.Body, true, false, true)
                    </div>
                </td>
            </tr>
        </table>
    </div>
    
    <div style="padding: 10px;">
    </div>
    @UIHelper.SectionHeader(Html.Global("forums", "DeleteReason"))
    <table style="width: 100%;">
        <tr>
            <td style="vertical-align: top; text-align: right;">
                <label for="DeleteReason">
                    @Html.Global("forums", "DeleteReason"):</label>
            </td>
            <td>
                @Ajax.Dna().TextArea("DeleteReason").Resizable().Width(780).GetHtml()
            </td>
        </tr>
    </table>
    <hr />
    <center>
        <table>
            <tr>
                <td>@(
 Ajax.Dna().Button()
                .ToolTip(Html.Global("forums", "Delete"))
                .ChangeType(ButtonTypes.LinkButton)
                .Submit()
                .Images(Url.ThemeContent("images/ui-forum-delete.png"), Url.ThemeContent("images/ui-forum-delete-hover.png"))
                .GetHtml())
                </td>
                <td>@(Ajax.Dna().Button()
                    .LocText("RES_CANCEL")
            .Click("location=\"" + Url.Action("Index", "Thread", new { id = Model.Thread.ID }) + "\";")
.ImageIcons(Url.Content("~/content/images/icon_back_16.png"))
                    .GetHtml()
        )
                </td>
            </tr>
        </table>
   </center>

}
